import request from '@/utils/request.js'

/**
 * 查询分页
 */
export const getList = (search) => {
  return request({
    url: '/system/config/list',
    method: 'GET',
    params: {
      ...search,
    },
  })
}

// 删除
export const remove = (ids) => {
  return request({
    url: "/system/config",
    method: 'DELETE',
    params: {
      ids
    }
  })
}

/**
 * 修改
 */
export const update = (row) => {
  return request({
    url: '/system/config',
    method: 'PUT',
    data: row,
  })
}

/**
 * 获取详情数据
 */
export const getNotice = (id) => {
  return request({
    url: `/system/config/${id}`,
    method: 'GET',
  })
}

/**
 * 添加数据
 */
export const add = (row) => {
  return request({
    url: '/system/config',
    method: 'POST',
    data: row,
  })
}

/**
 * 获取非内置系统配置
 */
export const getNoInternallyConfig = () => {
  return request({
    url: "/system/config/sys_config",
    method: 'GET',
  })
}